<?php
	require('autoload.php');
	if(empty($_GET)){
        $c = new HomeController();
    }else if($_GET['com']){
        $com = $_GET['com'];
        switch($com){
            case "users":
                $c= new UserController();
                break;
            case "login":
                $c = new LoginController();
                break;
            case "general":
                $c = new generalController();
                break;
			case 'article':
				$c = new ArticleController();
				break;
			case 'article_cat':
				$c = new ArticleCategoryController();
				break;
			case 'video':
				$c = new videoController();
				break;
            case 'videodemo':
				$c = new videodemoController();
				break;
            case 'product':
				$c = new productController();
            	break;
            case 'productCategory':
				$c = new productCategoryController();
				break;
            case 'relation':
				$c = new relationController();
				break;
            default:
                $c = new HomeController();
        }
    }else throw new Exception('Wrong page!');
	$c->handleRequest();
?>
